Doors

The Entity Meta for the Doors Module.

Functions

entityMeta:checkDoorAccess(client, access)

Checks if a player has access to a door. This function checks if a player has the required access level to interact with a door.

Parameters

  • client Player

    The player whose access is being checked.

  • access number

    The access level required (defaults to DOOR_GUEST).

Returns

  • boolean

    True if the player has the required access, false otherwise.

entityMeta:getDoorOwner()

Retrieves the owner of the entity. This function returns the player who owns the entity if it is a vehicle. It is intended for compatibility with DarkRP's vehicle ownership system.

Returns

  • Player or nil

    The player who owns the entity, or nil if no owner is set.

entityMeta:getDoorPartner()

Retrieves the partner door entity associated with this entity.

Returns

  • Entity

    The partner door entity, if any.

entityMeta:getDoorPartner()

Retrieves the partner entity of the door.

Returns

  • Entity

    The partner entity of the door, if any.

entityMeta:isDoor()

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

Checks if the entity is a door.

Returns

  • bool

    True if the entity is a door, false otherwise.

entityMeta:isDoor()

Checks if the entity is a door.

Returns

  • bool

    True if the entity is a door, false otherwise.

entityMeta:isDoorLocked()

Checks if the entity is locked (pertaining to doors).

Returns

  • bool

    True if the entity is locked, false otherwise.

entityMeta:isLocked()

Checks if the door is locked. This function checks whether the door entity is currently locked.

Returns

  • boolean

    True if the door is locked, false otherwise.

entityMeta:keysLock()

Locks the entity. This function locks the entity if it is a vehicle. It is intended for compatibility with DarkRP's vehicle locking system.

entityMeta:keysOwn(client)

Sets the owner of the entity. This function assigns ownership of the entity to the specified player. It is intended for compatibility with DarkRP's vehicle ownership system.

Parameters

  • client

    The player who will become the owner of the entity.

entityMeta:keysUnLock()

Unlocks the entity. This function unlocks the entity if it is a vehicle. It is intended for compatibility with DarkRP's vehicle unlocking system.

entityMeta:removeDoorAccessData()

Removes all door access data. This function clears all access data associated with the door and updates the clients.

entityMeta:setLocked(state)

Sets the locked state of the door. This function sets whether the door is locked or not.

Parameters

  • state Boolean

    The new locked state of the door (true for locked, false for unlocked).